Repository navigation
fix: surface raw-dump failures and rate-limit telemetry path noise (#362) - #364
Conversation
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-364Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr364.tgz
npm install -g packageThis comment is automatically updated on each push. |
) - Raw dumps (INCOMING/REQ/RES/SSE) that fail now log a rate-limited warn (first failure immediate, repeats suppressed within a 60s window, cumulative count) instead of failing silently. A stopped raw/ dump (disk full, locked dir) was previously invisible. - The 'unrecognized path' telemetry warn (client event-report endpoints forwarded unchanged) is now rate-limited per path (first 3 at warn, one 'suppressed' notice, then silent) instead of logging every hit (~20k lines in one user's capture). - No change to forwarding behavior; observability only. typecheck clean; 845 tests pass; build success.
[bot] Reviewed Pre-flight — all claims verified, reproduced locally:
Code review:
Minor notes (non-blocking):
E2E: skipped — local upstream Verdict: LGTM. Ready for merge — merging is human-only, so please merge yourself: #364 |
a2bce38 to
2f8c27a
Compare
A varying query (?ts=...) would split one endpoint into unbounded keys, defeating the suppression and growing the map without bound.
fab4a47 to
e6fd645
Compare
Part of #362 (request #4 + the telemetry-noise note). Observability-only changes to
src/server.ts; no change to forwarding or request behavior.What changed
Raw-dump failures are no longer silent. All five dump write paths (INCOMING / REQ / RES / SSE stream) previously swallowed their
catch {}(best-effort), so a dump that started failing (disk full, locked dir, EPERM) stopped writing with zero log lines — which is exactly what happened to this user'sraw/(4,192.ssefiles, silent stop after 08-29 18:40). They now calllogDumpFailure(where, err): first failure logs a[warn]immediately, repeats are suppressed within a 60s window, and it re-logs after the window with a cumulative count ([dump] <where> failed (total Nx): <msg>). The request is still never broken by a dump failure.unrecognized pathtelemetry warn is rate-limited per path. Client telemetry endpoints (e.g./api/v1/event/report) are forwarded unchanged — expected, not an error — but every hit logged a warn (~20k lines in one capture, 14,240 for a single path). Now per masked-path: first 3 hits atwarn, oneinfo"further occurrences suppressed" notice, then silent. (The logger has no debug-level filtering, so rate-limiting is the only way to cut the volume.)Notes
tests/dump-observability.test.tscovers both rate-limiters.Pre-flight
npm run typecheck— cleannpm test— 845 pass / 0 failnpm run build— success (dist/index.js 2.55MB)